//
// Project Kimchi
//
// Copyright IBM Corp, 2015-2017
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#guest-edit-window {
    .tab-content {
        overflow: hidden;
        height: auto;
    }
    .tab-content .tab-pane {
        position: relative;
    }
    #form-guest-edit-general {

        #guest-max-memory-panel,
        #guest-max-processor-panel {
            display: none;
        }

        #guest-edit-memory-textbox,
        #guest-edit-max-memory-textbox,
        #guest-edit-cores-textbox,
        #guest-edit-max-processor-textbox {
            width: 590px;
        }

        #guest-edit-memory-textbox,
        #guest-show-max-memory {
            display: inline-block;
        }

    }
    #form-guest-edit-storage {
        .column-actions {
            width: 26%;
        }
    }
    #form-guest-edit-snapshot {
        .column-actions {
            width: 22%;
        }
    }
    #form-guest-edit-pci {
        .wok-mask {
            top: 0 !important;
            z-index: 2 !important;
        }
        .column-actions {
            width: 4.47%;
        }
    }
    #form-edit-processor {
        #guest-processor label {
            display: block;
        }
        #guest-max-processor-panel label {
            display: block;
        }
        #guest-max-processor-panel .form-control,
        #guest-processor .form-control {
            display: inline-block;
            width: 184px;
        }
        .manual {
            margin-top: 5px;
            margin-bottom: 10px;
        }
        .topology {
            display: none;
            margin: 0 24px;
        }
        .topology label {
            display: block;
        }
    }
    form {
        margin: 15px 0 0;
        .header{
          .cell.column-network,
          .cell.column-mac {
            display: inline-block;
            overflow-x: hidden;
            overflow-y: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        },
        .task,
        .body {
            .column-actions {
                text-align: right;
            }
            .column-device {
                width: 12.7%;
            }
            .column-path {
                width: 60.25%;
            }
            .cell.column-network {
              width: 184px;
                > span {
                    width: 100%;
                    display: inline-block;
                    text-overflow: ellipsis;
                    overflow: hidden;
                }
            }
            .cell.column-type {
              width: 184px;
            }
            .cell.column-mode {
              width: 164px;
            }
            .cell.column-mac {
              width: 174px;
            }
            .cell.column-ip {
              width: 150px;
              display: inline-block;
              text-overflow: ellipsis;
              white-space: nowrap;
            }
            .cell.column-sel {
                width: 1.77%;
            }
            .cell.column-snapshot-name {
                width: 58%;
            }
            .cell.column-snapshot-created {
                width: 16.5%;
            }
            .cell.column-pci-status {
                width: 3.7%;
                .fa {
                    color: $virtColor;
                    font-size: 24px;
                }
            }
            .cell.column-pci-name {
                width: 21%;
            }
            .cell.column-product {
                width: 45%;
            }
            .cell.column-vendor {
                width: 24.1%;
            }
        }
        .header {
            background: $table-bg;
            display: block;
            border-bottom: 1px solid $table-border-color;
            overflow: hidden;
            clear: both;
            > span {
                padding: $table-cell-padding;
                display: inline-block;
                font-family: $font-family-light;
                font-weight: 400;
                font-size: 12.5pt;
                vertical-align: bottom;
                border-bottom: none;
                border-top: 0;
                line-height: $line-height-base;
                &.column-actions {
                    height: 36px;
                }
            }
        }
        .body {
            overflow-y: auto;
            overflow-x: hidden;
            height: 471px;
        }
        .body,
        .task {
            .item {
                border-top: 1px solid $table-border-color;
                height: 53px;
                &:first-child {
                    border-top: 0;
                }
                > span {
                    padding: $table-cell-padding;
                    display: inline-block;
                    vertical-align: middle;
                    input[type="text"] {
                        height: 40px;
                    }
                    input[readonly],
                    input[readonly]:hover,
                    input[readonly]:focus,
                    input[readonly]:active {
                        background-color: transparent !important;
                        border-color: transparent !important;
                        box-shadow: none !important;
                        border-radius: 0 !important;
                        text-overflow: ellipsis;
                        padding-right: 0 !important;
                        padding-left: 0 !important;
                        width: 100%;
                    }
                }
            }
        }
    }
}

#guest-edit-window form .body .item:nth-child(even),
#guest-edit-window form .task .item:nth-child(even) {
    background-color: $table-bg-accent;
}

#guest-edit-window form .body .item:nth-child(odd),
#guest-edit-window form .task .item:nth-child(odd) {
    background-color: $table-bg;
}

#guest-edit-window form .header .cell.column-network .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn),
#guest-edit-window form .task .cell.column-network .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn),
#guest-edit-window form .body .cell.column-network .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
  width: 180px;
}

#guest-edit-window form .header .cell.column-mode .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn),
#guest-edit-window form .task .cell.column-mode .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn),
#guest-edit-window form .body .cell.column-mode .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
  width: 160px;
}

#guest-edit-window form .header .cell.column-type .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn),
#guest-edit-window form .task .cell.column-type .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn),
#guest-edit-window form .body .cell.column-type .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
  width: 180px;
}

.guest-edit-snapshot .hide,
.guest-edit-interface .hide {
    display: none !important;
}

.guest-edit-pci {
    .filter {
        height: 40px;
        overflow: visible;
        clear: both;
    }
    .pull-right .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
        width: 133px;
    }
    .filter input[type="text"].form-control {
        width: 460px;
        height: 40px;
        float: right;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }
    .filter .bootstrap-select.btn-group .btn .caret {
        border-left: 0;
    }
    .filter button.btn.dropdown-toggle.form-control.selectpicker.btn-default {
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        background: $table-bg-accent;
        border-right: 0;
    }
    .body {
        overflow-y: auto;
        overflow-x: hidden;
        height: 442px !important;
    }
    .body .item.disabled input[type="text"].form-control {
        color: $gray-light;
    }
    .body .item.disabled span.column-pci-status i {
        display: none;
    }
}

.guest-edit-permission {
    .pam {
        height: 540px;
        .column {
            display: inline-block;
            vertical-align: top;
        }
        .v-center {
            min-height: 532px;
            display: flex;
            justify-content: center;
            flex-flow: column wrap;
        }
        .center-block {
            display: block;
            margin-left: auto;
            margin-right: auto;
        }
        .center-block + .center-block {
            margin-top: 5px;
        }
        .title {
            font-size: 13pt;
        }
        .body {
            margin-top: 4px;
            border-radius: 3px;
            border: 1px solid $table-border-color;
            height: 460px !important;
        }
        .body .head {
            .item {
                display: block;
                padding: $table-cell-padding;
                margin-bottom: 5px;
                font-family: $font-family-light;
                font-weight: 400;
                font-size: 12.5pt;
                vertical-align: bottom;
                line-height: $line-height-base;
                height: auto !important;
                background: $table-bg;
                border-top: 0;
                border-bottom: 1px solid $table-border-color;
                cursor: default;
            }
        }
        .body > .column-user .item,
        .body > .column-group .item {
            height: auto !important;
            margin-bottom: 0;
            margin-left: 5px;
        }
        .body > .column-group .item {
            margin-right: 5px;
        }
        .column-user label,
        .column-group label {
            cursor: pointer;
            margin-bottom: 0;
            margin-left: 5px;
            width: 160px;
            height: 24px;
            line-height: 22px;
            overflow: hidden;
            text-overflow: ellipsis;
            vertical-align: middle;
        }
        .body > .column .item {
            background-color: $btn-default-bg !important;
            border: 1px solid $table-border-color !important;
            margin-bottom: 3px;
            display: block;
            padding: .2em .6em .3em;
            font-weight: 700;
            line-height: 1;
            text-align: left;
            white-space: nowrap;
            vertical-align: middle;
            border-radius: .25em;
            overflow: hidden;
        }
        .body > .column .item:hover {
            color: $btn-default-color !important;
            background-color: #e6e6e6 !important;
            border-color: #adadad !important;
            label {
                color: $btn-default-color !important;
            }
        }
        .body > .column .item.item-picked {
            color: $btn-primary-color !important;
            background-color: $btn-primary-bg !important;
            border-color: #1b1b1c !important;
            outline: 5px auto -webkit-focus-ring-color;
            outline-offset: -2px;
            label {
                color: $btn-primary-color !important;
            }
        }
    }
    .hide {
        display: none;
    }
}

#form-guest-edit-permission .ldap .body .item {
    margin: 8px 0;
}

#form-guest-edit-permission .ldap .cell {
    width: 250px;
}

#form-guest-edit-permission .ldap .action-area {
    float: right;
    line-height: 24px;
}

#form-guest-edit-permission .ldap .header button {
    margin-bottom: 1px;
}

#form-guest-edit-permission .ldap .checked {
    border-color: red;
    border-style: solid;
    border-width: 1px;
}

#form-guest-edit-permission .ldap .checked.hide {
    display: none;
}

#guest-storage-add-window {}

#form-guest-storage-add .form-section .field {
    overflow: visible;
}

ul {
  cursor: default;
}

.boot-order {
  display: block;
  width: 85%;
  font-size: 14px;
  line-height: 1.42857;
  color: #444;
  overflow: hidden;
  background-color: #fff;
  background-image: none;
  border: 1px solid #ccc;
  border-radius: 3px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
  -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

.boot-order:focus,
.boot-order.focus {
  border-color: #66afe9;
  outline: 0;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

.boot-order > li {
  cursor: move; /* fallback if grab cursor is unsupported */
  cursor: grab;
  cursor: -moz-grab;
  cursor: -webkit-grab;
  border-left: 0;
  border-right: 0;
}

.boot-order > li:first-child {
  border-top: 0;
}

.boot-order > li:last-child {
  border-bottom: 0;
}

.boot-order > li.ui-sortable-helper {
  cursor: grabbing;
  cursor: -moz-grabbing;
  cursor: -webkit-grabbing;
  border: 1px solid #ccc !important;
}

.boot-order  li i {
  text-align: right;
}
